<template>
	<view class="courier-home">
		<!-- 动态背景 -->
		<view class="particle-bg">
			<view class="particle p1"></view>
			<view class="particle p2"></view>
			<view class="particle p3"></view>
		</view>

		<!-- 顶部用户信息 -->
		<view class="user-header">
			<view class="user-card">
				<view class="user-main">
					<image class="avatar" :src="userInfo.avatar || '/static/avatar.png'"></image>
					<view class="user-detail">
						<text class="username">{{userInfo.name || '配送员'}}</text>
						<view class="user-level">
							<uni-icons type="crown-filled" size="20" color="#FFC107"></uni-icons>
							<text>金牌配送员</text>
						</view>
						<view class="user-stats">
							<text class="stat-item">手机: {{userInfo.phone || '暂无'}}</text>
							<text class="stat-item">工号: {{userInfo.id ? 'NO.'+userInfo.id : '暂无'}}</text>
						</view>
					</view>
				</view>

				<view class="stats-overview">
					<view class="stat-card today-orders">
						<text class="stat-value">{{totalOrders}}</text>
						<text class="stat-label">总订单</text>
					</view>
					<view class="stat-card today-income">
						<text class="stat-value">¥{{todayIncome}}</text>
						<text class="stat-label">今日收入</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 订单状态卡片 -->
		<view class="status-section">
			<view class="section-title">
				<text>订单状态</text>
				<view class="title-line"></view>
			</view>

			<view class="status-grid">
				<!-- 待接单 -->
				<view class="status-card" :style="{backgroundColor: getStatusBgColor(0)}"
					@click="navigateToOrderList(0)">
					<view class="card-badge">{{orderCounts[0]}}</view>
					<view class="card-icon">
						<uni-icons type="cart" size="36" :color="getStatusColor(0)"></uni-icons>
					</view>
					<text class="card-title">待接单</text>
					<text class="card-desc">等待接单的订单</text>
					<view class="card-wave" :style="{background: getWaveColor(0)}"></view>
				</view>

				<!-- 已接单 -->
				<view class="status-card" :style="{backgroundColor: getStatusBgColor(1)}"
					@click="navigateToOrderList(1)">
					<view class="card-badge">{{orderCounts[1]}}</view>
					<view class="card-icon">
						<uni-icons type="checkbox-filled" size="36" :color="getStatusColor(1)"></uni-icons>
					</view>
					<text class="card-title">已接单</text>
					<text class="card-desc">待取件的订单</text>
					<view class="card-wave" :style="{background: getWaveColor(1)}"></view>
				</view>

				<!-- 配送中 -->
				<view class="status-card" :style="{backgroundColor: getStatusBgColor(2)}"
					@click="navigateToOrderList(2)">
					<view class="card-badge">{{orderCounts[2]}}</view>
					<view class="card-icon">
						<uni-icons type="paperplane" size="36" :color="getStatusColor(2)"></uni-icons>
					</view>
					<text class="card-title">配送中</text>
					<text class="card-desc">正在配送的订单</text>
					<view class="card-wave" :style="{background: getWaveColor(2)}"></view>
				</view>

				<!-- 已完成 -->
				<view class="status-card" :style="{backgroundColor: getStatusBgColor(3)}"
					@click="navigateToOrderList(3)">
					<view class="card-badge">{{orderCounts[3]}}</view>
					<view class="card-icon">
						<uni-icons type="checkmarkempty" size="36" :color="getStatusColor(3)"></uni-icons>
					</view>
					<text class="card-title">已完成</text>
					<text class="card-desc">已完成的订单</text>
					<view class="card-wave" :style="{background: getWaveColor(3)}"></view>
				</view>
			</view>
		</view>

		<!-- 修改图表区域 -->
		<view class="chart-section">
			<view class="section-title">
				<text>近7天订单量</text>
				<view class="title-line"></view>
			</view>
			图表
		</view>

		<!-- 最近订单 -->
		<view class="recent-orders">
			<view class="section-title">
				<text>最近订单</text>
				<view class="title-line"></view>
			</view>

			<scroll-view class="order-list">
				<view class="order-item" v-for="(order, index) in recentOrders" :key="index"
					@click="viewOrderDetail(order.id)">
					<view class="order-header">
						<text class="order-no">订单号：DD{{order.id.toString().padStart(6, '0')}}</text>
						<view class="order-status" :style="{backgroundColor: getStatusBgColor(order.status)}">
							<text :style="{color: getStatusColor(order.status)}">{{getStatusText(order.status)}}</text>
						</view>
					</view>

					<view class="order-content">
						<view class="address-row">
							<uni-icons type="location" size="20" color="#FF9800"></uni-icons>
							<text class="address-text">取件码：{{order.pickupCode}}</text>
						</view>
						<view class="address-row">
							<uni-icons type="location" size="20" color="#FF9800"></uni-icons>
							<text class="address-text">取件地点：{{order.pickupLocation}}</text>
						</view>
						<view class="address-row">
							<uni-icons type="home" size="20" color="#4CAF50"></uni-icons>
							<text class="address-text">收件人：{{order.villagerName}}</text>
						</view>
					</view>

					<view class="order-footer">
						<text class="order-time">{{formatTime(order.createTime)}}</text>
						<text class="order-price">¥{{order.finalPrice.toFixed(2)}}</text>
					</view>
				</view>
			</scroll-view>
		</view>

		<!-- 浮动操作按钮 -->
		<view class="float-btn" @click="scanQRCode">
			<uni-icons type="scan" size="28" color="#fff"></uni-icons>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {}, // 快递员信息
				recentOrders: [], // 最近订单数据
				orderCounts: {
					0: 0,
					1: 0,
					2: 0,
					3: 0
				}, // 各状态订单数量
				todayIncome: 0, // 今日收入
				totalOrders: 0, // 总订单数
				
				
			}
		},
		onLoad() {
			this.loadCourierInfo();
			this.fetchCourierOrders();
			this.fetchPendingOrders();
			this.startAnimations();
		},
		methods: {
			// 从本地缓存加载快递员信息
			loadCourierInfo() {
				const courierInfo = uni.getStorageSync('courierInfo');
				if (courierInfo) {
					this.userInfo = courierInfo;
				} else {
					uni.showToast({
						title: '未登录',
						icon: 'none'
					});
					uni.redirectTo({
						url: '/pages/login/login'
					});
				}
			},

			// 获取快递员的所有订单
			fetchCourierOrders() {
				uni.request({
					url: `http://localhost:9090/order/courierOrders?courierId=${this.userInfo.id}`,
					method: 'GET',
					success: (res) => {
						if (res.data.status === 1) {
							this.recentOrders = res.data.data;
							this.totalOrders = this.recentOrders.length;
							this.calculateOrderCounts();
							this.calculateTodayIncome();
							this.updateWeekOrderData();
						}
					}
				});
			},

			// 获取未接单的订单
			fetchPendingOrders() {
				uni.request({
					url: 'http://localhost:9090/order/pendingOrders',
					method: 'GET',
					success: (res) => {
						if (res.data.status === 1) {
							this.orderCounts[0] = res.data.data.length;
						}
					}
				});
			},
			// 修改updateWeekOrderData方法
			updateWeekOrderData() {
				// 生成近7天的日期标签
				const dateLabels = [];
				const dateMap = {}; // 用于按日期分组统计订单数

				// 初始化7天数据
				for (let i = 6; i >= 0; i--) {
					const date = new Date();
					date.setDate(date.getDate() - i);
					const dateStr = this.formatChartDate(date);
					dateLabels.push(dateStr);
					dateMap[dateStr] = 0; // 初始化每天订单数为0
				}

				// 统计每天的总订单数
				this.recentOrders.forEach(order => {
					const orderDate = new Date(order.createTime);
					const dateStr = this.formatChartDate(orderDate);

					if (dateMap[dateStr] !== undefined) {
						dateMap[dateStr]++;
					}
				});

				// 填充数据
				const orderCounts = dateLabels.map(date => dateMap[date]);

				// 更新图表数据
				this.weekOrderData = {
					categories: dateLabels,
					series: [{
						name: "总订单",
						type: "column",
						data: orderCounts
					}]
				};

				console.log('近7天订单数据:', this.weekOrderData);
			},
			// 添加日期格式化方法
			formatChartDate(date) {
				const month = date.getMonth() + 1;
				const day = date.getDate();
				return `${month}/${day}`;
			},
			// 计算各状态订单数量
			calculateOrderCounts() {
				const counts = {
					0: this.orderCounts[0],
					1: 0,
					2: 0,
					3: 0
				};
				this.recentOrders.forEach(order => {
					counts[order.status]++;
				});
				this.orderCounts = counts;
			},

			// 计算今日收入
			calculateTodayIncome() {
				const today = new Date().toISOString().split('T')[0];
				this.todayIncome = this.recentOrders
					.filter(order => order.createTime.includes(today))
					.reduce((sum, order) => sum + order.finalPrice, 0)
					.toFixed(2);
			},

			// 状态相关方法
			getStatusText(status) {
				const statusMap = {
					0: '待接单',
					1: '已接单',
					2: '配送中',
					3: '已完成'
				};
				return statusMap[status] || '未知状态';
			},

			getStatusColor(status) {
				switch (status) {
					case 0:
						return '#FF9800';
					case 1:
						return '#2196F3';
					case 2:
						return '#FFC107';
					case 3:
						return '#4CAF50';
					default:
						return '#666';
				}
			},

			getStatusBgColor(status) {
				const bgMap = {
					0: 'rgba(255, 152, 0, 0.1)',
					1: 'rgba(33, 150, 243, 0.1)',
					2: 'rgba(255, 193, 7, 0.1)',
					3: 'rgba(76, 175, 80, 0.1)'
				};
				return bgMap[status] || 'rgba(0, 0, 0, 0.1)';
			},

			getWaveColor(status) {
				const waveMap = {
					0: 'linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.3), transparent)',
					1: 'linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.3), transparent)',
					2: 'linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.3), transparent)',
					3: 'linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent)'
				};
				return waveMap[status] || 'linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.3), transparent)';
			},

			// 时间处理方法
			formatDate(date) {
				const year = date.getFullYear();
				const month = date.getMonth() + 1;
				const day = date.getDate();
				return `${year}年${month}月${day}日`;
			},

			formatTime(timeStr) {
				if (!timeStr) return '';
				const date = new Date(timeStr);
				return `${date.getHours()}:${date.getMinutes().toString().padStart(2, '0')}`;
			},

			// 动画效果
			startAnimations() {
				this.animateParticles();
			},

			animateParticles() {
				const particles = document.querySelectorAll('.particle');
				particles.forEach((particle, index) => {
					const duration = 15 + index * 3;
					particle.style.animation = `float ${duration}s infinite ease-in-out`;
				});
			},

			// 导航方法
			navigateToOrderList(status) {
				uni.navigateTo({
					url: `/pages/orderList/orderList?status=${status}`
				});
			},

			viewOrderDetail(orderId) {
				uni.navigateTo({
					url: `/pages/orderDetail/orderDetail?id=${orderId}`
				});
			},

			scanQRCode() {
				uni.scanCode({
					success: (res) => {
						uni.showToast({
							title: '扫码成功',
							icon: 'success'
						});
					}
				});
			}
		}
	}
</script>
<style lang="scss" scoped>
	.courier-home {
		position: relative;
		width: 100%;
		min-height: 100vh;
		// background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
		background-image: radial-gradient(circle at 10% 20%, rgba(255, 15, 51, 0.0) 0, transparent 20%), radial-gradient(circle at 90% 80%, rgba(8, 255, 111, .1) 0, transparent 20%);

		padding-bottom: 120rpx;
		overflow-x: hidden;
	}

	/* 动态粒子背景 */
	.particle-bg {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 0;
		overflow: hidden;

		.particle {
			position: absolute;
			border-radius: 50%;
			background: rgba(255, 255, 255, 0.6);
			filter: blur(1px);
			opacity: 0.8;
			animation: float 15s infinite ease-in-out;

			&.p1 {
				width: 300rpx;
				height: 300rpx;
				top: 10%;
				left: 5%;
				background: rgba(100, 210, 255, 0.2);
				animation-delay: 0s;
			}

			&.p2 {
				width: 250rpx;
				height: 250rpx;
				bottom: 15%;
				right: 5%;
				background: rgba(120, 220, 160, 0.2);
				animation-delay: 3s;
			}

			&.p3 {
				width: 200rpx;
				height: 200rpx;
				top: 50%;
				left: 20%;
				background: rgba(255, 200, 150, 0.2);
				animation-delay: 6s;
			}
		}
	}

	.user-header {
		padding: 30rpx;
		position: relative;
		z-index: 10;
		margin-bottom: 30rpx;

		.user-card {
			// background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.95));
			border-radius: 24rpx;
			padding: 30rpx;
			display: flex;
			justify-content: space-between;
			box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
			backdrop-filter: blur(10rpx);
			border: 1rpx solid rgba(255, 255, 255, 0.3);
			position: relative;
			overflow: hidden;

			&::before {
				content: '';
				position: absolute;
				top: 0;
				left: 0;
				width: 8rpx;
				height: 100%;
				background: linear-gradient(to bottom, #4a90e2, #6a8ccc);
			}

			.user-main {
				display: flex;
				align-items: center;

				.avatar {
					width: 120rpx;
					height: 120rpx;
					border-radius: 50%;
					border: 4rpx solid rgba(255, 255, 255, 0.8);
					margin-right: 25rpx;
					box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.1);
					background-color: #f5f5f5;
				}

				.user-detail {
					display: flex;
					flex-direction: column;

					.username {
						font-size: 36rpx;
						font-weight: bold;
						color: #333;
						margin-bottom: 10rpx;
						position: relative;
						display: inline-block;

						&::after {
							content: '';
							position: absolute;
							bottom: 0;
							left: 0;
							width: 60%;
							height: 4rpx;
							background: linear-gradient(to right, #4a90e2, transparent);
							border-radius: 2rpx;
						}
					}

					.user-level {
						display: inline-flex;
						align-items: center;
						background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 235, 59, 0.1));
						padding: 5rpx 15rpx;
						border-radius: 20rpx;
						margin-bottom: 15rpx;
						align-self: flex-start;

						text {
							font-size: 24rpx;
							color: #FFC107;
							margin-left: 8rpx;
						}
					}

					.user-stats {
						display: flex;
						flex-direction: column;

						.stat-item {
							font-size: 24rpx;
							color: #666;
							margin-bottom: 8rpx;
							position: relative;
							padding-left: 20rpx;

							&::before {
								content: '';
								position: absolute;
								left: 0;
								top: 50%;
								transform: translateY(-50%);
								width: 8rpx;
								height: 8rpx;
								border-radius: 50%;
								background: #4a90e2;
							}

							&:last-child {
								margin-bottom: 0;
							}
						}
					}
				}
			}

			.stats-overview {
				display: flex;
				flex-direction: column;
				justify-content: space-between;

				.stat-card {
					background: rgba(255, 255, 255, 0.7);
					border-radius: 16rpx;
					padding: 15rpx 20rpx;
					width: 180rpx;
					box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.03);
					backdrop-filter: blur(5rpx);
					border: 1rpx solid rgba(255, 255, 255, 0.2);

					&.today-orders {
						border-left: 4rpx solid #4a90e2;
					}

					&.today-income {
						border-left: 4rpx solid #FF9800;
					}

					.stat-value {
						display: block;
						font-size: 32rpx;
						font-weight: bold;
						color: #333;
						margin-bottom: 5rpx;

						&.today-income {
							color: #FF9800;
						}
					}

					.stat-label {
						display: block;
						font-size: 22rpx;
						color: #999;
						margin-bottom: 8rpx;
					}

					.stat-trend {
						display: flex;
						align-items: center;
						font-size: 20rpx;

						&.up {
							color: #4CAF50;
						}

						&.down {
							color: #F44336;
						}

						text {
							margin-left: 5rpx;
						}
					}
				}
			}
		}

		.weather-time {
			display: flex;
			justify-content: space-between;
			margin-top: 25rpx;

			.weather-info {
				display: flex;
				align-items: center;
				background: rgba(255, 255, 255, 0.9);
				border-radius: 30rpx;
				padding: 15rpx 25rpx;
				box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.05);
				backdrop-filter: blur(10rpx);
				border: 1rpx solid rgba(255, 255, 255, 0.3);

				.weather-icon {
					display: flex;
					align-items: center;
					margin-right: 15rpx;

					text {
						font-size: 26rpx;
						color: #333;
						margin-left: 10rpx;
					}
				}

				.temperature {
					font-size: 28rpx;
					font-weight: bold;
					color: #FF5722;
				}
			}

			.time-info {
				display: flex;
				align-items: center;
				background: rgba(255, 255, 255, 0.9);
				border-radius: 30rpx;
				padding: 15rpx 25rpx;
				box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.05);
				backdrop-filter: blur(10rpx);
				border: 1rpx solid rgba(255, 255, 255, 0.3);

				text {
					font-size: 26rpx;
					color: #333;
					margin-left: 10rpx;
				}

				.time {
					font-weight: bold;
					color: #2196F3;
					margin-left: 5rpx;
				}
			}
		}
	}

	/* 状态卡片区域 */
	.status-section {
		padding: 0 30rpx;
		margin-bottom: 30rpx;
		position: relative;
		z-index: 10;

		.section-title {
			margin-bottom: 30rpx;
			position: relative;

			text {
				font-size: 32rpx;
				font-weight: bold;
				color: #333;
				position: relative;
				display: inline-block;
				padding-right: 20rpx;
				background: linear-gradient(135deg, #4a90e2, #6a8ccc);
				-webkit-background-clip: text;
				-webkit-text-fill-color: transparent;
			}

			.title-line {
				position: absolute;
				bottom: 5rpx;
				left: 0;
				width: 100%;
				height: 2rpx;
				background: linear-gradient(90deg, rgba(74, 144, 226, 0.3), transparent);
			}
		}

		.status-grid {
			display: grid;
			grid-template-columns: repeat(2, 1fr);
			gap: 20rpx;
		}

		.status-card {
			height: 200rpx;
			border-radius: 20rpx;
			padding: 30rpx;
			position: relative;
			overflow: hidden;
			box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
			backdrop-filter: blur(10rpx);
			border: 1rpx solid rgba(255, 255, 255, 0.3);
			animation: fadeInUp 0.5s both;

			&:active {
				transform: scale(0.98);
			}

			.card-badge {
				position: absolute;
				top: 20rpx;
				right: 20rpx;
				width: 50rpx;
				height: 50rpx;
				background: rgba(255, 255, 255, 0.9);
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 28rpx;
				font-weight: bold;
				box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.1);
			}

			.card-icon {
				width: 70rpx;
				height: 70rpx;
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: center;
				margin-bottom: 15rpx;
				box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.1);
			}

			.card-title {
				display: block;
				font-size: 32rpx;
				font-weight: bold;
				color: #333;
				margin-bottom: 5rpx;
			}

			.card-desc {
				display: block;
				font-size: 24rpx;
				color: #666;
			}

			.card-wave {
				position: absolute;
				bottom: 0;
				left: 0;
				width: 100%;
				height: 10rpx;
				animation: wave 3s infinite linear;
			}
		}
	}

	/* 图表区域 */
	.chart-section {
		// background: rgba(255, 255, 255, 0.9);
		border-radius: 20rpx;
		margin: 0 30rpx 30rpx;
		padding: 30rpx;
		box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
		position: relative;
		z-index: 10;
		backdrop-filter: blur(10rpx);
		border: 1rpx solid rgba(255, 255, 255, 0.3);
		animation: fadeInUp 0.5s both;

		.section-title {
			margin-bottom: 30rpx;
			position: relative;

			text {
				font-size: 32rpx;
				font-weight: bold;
				color: #333;
				position: relative;
				display: inline-block;
				padding-right: 20rpx;
				background: linear-gradient(135deg, #4a90e2, #6a8ccc);
				-webkit-background-clip: text;
				-webkit-text-fill-color: transparent;
			}

			.title-line {
				position: absolute;
				bottom: 5rpx;
				left: 0;
				width: 100%;
				height: 2rpx;
				background: linear-gradient(90deg, rgba(74, 144, 226, 0.3), transparent);
			}
		}

		.qiun-charts {
			width: 100%;
			height: 300rpx;
		}
	}

	/* 最近订单 */
	.recent-orders {
		// background: rgba(255, 255, 255, 0.9);
		border-radius: 20rpx;
		margin: 0 30rpx;
		padding: 30rpx;
		box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
		position: relative;
		z-index: 10;
		backdrop-filter: blur(10rpx);
		border: 1rpx solid rgba(255, 255, 255, 0.3);
		animation: fadeInUp 0.5s both;

		.section-title {
			margin-bottom: 30rpx;
			position: relative;

			text {
				font-size: 32rpx;
				font-weight: bold;
				color: #333;
				position: relative;
				display: inline-block;
				padding-right: 20rpx;
				background: linear-gradient(135deg, #4a90e2, #6a8ccc);
				-webkit-background-clip: text;
				-webkit-text-fill-color: transparent;
			}

			.title-line {
				position: absolute;
				bottom: 5rpx;
				left: 0;
				width: 100%;
				height: 2rpx;
				background: linear-gradient(90deg, rgba(74, 144, 226, 0.3), transparent);
			}
		}

		.order-list {
			// max-height: 600rpx;

			.order-item {
				background: rgba(255, 255, 255, 0.15);
				border-radius: 20rpx;
				padding: 30rpx;
				margin-bottom: 20rpx;
				box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
				position: relative;
				overflow: hidden;
				animation: fadeInUp 0.5s both;
				backdrop-filter: blur(10rpx);
				border: 1rpx solid rgba(255, 255, 255, 0.3);
				transition: all 0.3s;

				&:active {
					transform: scale(0.98);
				}

				.order-header {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-bottom: 20rpx;

					.order-no {
						font-size: 28rpx;
						font-weight: bold;
						color: #333;
					}

					.order-status {
						padding: 5rpx 15rpx;
						border-radius: 20rpx;
						font-size: 26rpx;
						font-weight: bold;
					}
				}

				.order-content {
					.address-row {
						display: flex;
						align-items: center;
						margin-bottom: 15rpx;

						&:last-child {
							margin-bottom: 0;
						}

						.address-text {
							font-size: 26rpx;
							color: #666;
							margin-left: 10rpx;
						}
					}
				}

				.order-footer {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-top: 20rpx;
					padding-top: 20rpx;
					border-top: 1rpx solid rgba(0, 0, 0, 0.05);

					.order-time {
						font-size: 24rpx;
						color: #999;
					}

					.order-price {
						font-size: 28rpx;
						font-weight: bold;
						color: #FF9800;
					}
				}
			}
		}
	}

	/* 浮动按钮 */
	.float-btn {
		position: fixed;
		right: 40rpx;
		bottom: 40rpx;
		width: 100rpx;
		height: 100rpx;
		background: linear-gradient(135deg, #4a90e2, #6a8ccc);
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 10rpx 30rpx rgba(74, 144, 226, 0.4);
		z-index: 100;
		transition: all 0.3s;

		&:active {
			transform: scale(0.95);
		}
	}

	/* 动画效果 */
	@keyframes float {

		0%,
		100% {
			transform: translate(0, 0) rotate(0deg);
		}

		25% {
			transform: translate(20rpx, -30rpx) rotate(5deg);
		}

		50% {
			transform: translate(-15rpx, 20rpx) rotate(-5deg);
		}

		75% {
			transform: translate(10rpx, -10rpx) rotate(3deg);
		}
	}

	@keyframes wave {
		0% {
			transform: translateX(-100%);
		}

		100% {
			transform: translateX(100%);
		}
	}

	@keyframes fadeInUp {
		from {
			opacity: 0;
			transform: translateY(30rpx);
		}

		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
</style>